/*
 *  Copyright (C) 2010 Glauco
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.common.abstracts;

import org.balisunrise.common.Grid;
import org.balisunrise.common.EntityLoader;

/**
 *
 * @author Glauco
 */
public abstract class AbstractEntityGrid extends AbstractVisualEntity{

    protected EntityLoader loader;
    protected Grid grid;
    public static final String PROP_GRID = "grid";
    public static final String PROP_LOADER = "loader";

    /**
     * Get the value of loader
     *
     * @return the value of loader
     */
    public EntityLoader getLoader() {
        return loader;
    }

    /**
     * Set the value of loader
     *
     * @param loader new value of loader
     */
    public void setLoader(EntityLoader loader) {
        EntityLoader oldLoader = this.loader;
        this.loader = loader;
        changeSupport.firePropertyChange(PROP_LOADER, oldLoader, loader);
    }

    /**
     * Get the value of grid
     *
     * @return the value of grid
     */
    public Grid getGrid() {
        return grid;
    }

    /**
     * Set the value of grid
     *
     * @param grid new value of grid
     */
    public void setGrid(Grid grid) {
        Grid oldGrid = this.grid;
        this.grid = grid;
        changeSupport.firePropertyChange(PROP_GRID, oldGrid, grid);
    }

}
